package com.iaiai.cobra.repository.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.iaiai.cobra.repository.bean.RoleMenu;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created with RoleMenuMapper.
 * Package: com.iaiai.cobra.repository.mapper
 * Author: iaiai
 * Create Time: 2024/7/16 21:06
 * QQ: 176291935
 * Email: 176291935@qq.com
 * Description:
 */
@Mapper
@Repository
public interface RoleMenuMapper extends BaseMapper<RoleMenu> {

    //查询配置的菜单
    List<RoleMenu> queryMenus(@Param("roleId") Long roleId);

    void delRoleMenu(@Param("roleId") Long roleId,@Param("menuId") Long menuId);

    //删除菜单
    void delMenu(@Param("menuId") Long menuId);

    //删除角色
    void delRole(@Param("roleId") Long roleId);

}
